// 公共中心
import axios from '../base'
import { commonApiHost } from '@/config/env'

const isProd = process.env.NODE_ENV === 'production'
const baseURL = isProd ? commonApiHost : '/commonApi'
// const baseURL = commonApiHost

export const getUserInfo = (params, config) => axios.get('/user/info', {
  params,
  baseURL,
  system: 'oAuth',
  ...config,
})

export const logout = (params, config) => axios.get('/token/loginout', {
  params,
  baseURL,
  system: 'oAuth',
  ...config,
})

export const checkToken = (params, config) => axios.get('/token/check', {
  params,
  baseURL,
  system: 'oAuth',
  ...config,
})
